<include file="header" />

<script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#kindeditor');
        });
</script>
<div class="main-container" id="main-container">
	<script type="text/javascript">
		try{ace.settings.check('main-container' , 'fixed')}catch(e){}
	</script>
	 <include file="Public:sidebar" />
	 <div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="__MODULE__/">主页</a>
				</li>
				<li class="active">{$title}</li>
			</ul><!-- /.breadcrumb -->
		</div>	 
			<div class="page-content">
				<div class="row">
					<div class="col-md-12">
					<form action="__CONTROLLER__/addHandle" method="post" class="form-horizontal" role="form">
						<div class="row">
							<div class="col-md-9">
								<div class="form-group">
									<label class="col-sm-1 control-label" for="title"> 标题 </label>

									<div class="col-sm-11">
										<input type="text" name="title" id="title" placeholder="请文章输入标题" class="form-control">
									</div>
								</div>	
								<div class="clearfix"></div>
								<!-- 编辑器开始 -->
								<script id="container" name="content" type="text/plain"></script>						
								<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
							    <!-- 编辑器源码文件 -->
							    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
							    <!-- 实例化编辑器 -->
							    <script type="text/javascript">
							        var ue = UE.getEditor('container', {
										initialFrameHeight :800,
									    autoHeightEnabled: true,
									    autoFloatEnabled: true,
									});
							    </script>								
								<!-- 编辑器结束 -->															
							</div>
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="cate_id"> 分类目录 </label>

									<div class="col-sm-9">
										<select name="cate_id" id="cate_id" class="postform">
											<foreach name="cate" item="v">
												<option value="{$v.id}">{$v.html}{$v.name}</option>
											</foreach>
										</select>
									</div>
								</div>

								<div class="space-4"></div>

								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 文章属性 </label>

									<div class="col-sm-9">
									
										<div class="checkbox" style="float:left;margin-right: 10px;padding-left:0;">

											<label>
												<input name="top" type="checkbox" class="ace">
												<span class="lbl"> 置顶</span>
											</label>
										</div>															
									</div>
								</div>
								<div class="space-4"></div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">标签</label>

									<div class="col-sm-9">
										<div class="inline">
											<input type="text" name="tags" id="form-field-tags"  placeholder="输入标签后回车" />
										</div>
									</div>
								</div>	
								<div class="space-4"></div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="form-field-tags">缩略图</label>

									<div class="col-sm-9">
											<input type="text" name="thumb" id="savepath" />
											<a href="#" id="upload" class="btn btn-info btn-sm">上传图片</a>
											<div id="result"></div>
											<div class="clearfix"></div>
											<div class="row">
												<div class="col-md-12">
													<div class="thumb">
														<img src="" alt="" style="width:100%">
													</div>
												</div>
											</div>

									</div>
								</div>															
								<div class="clearfix form-actions">
									<div class="row">
										<div class="col-md-6">
											<button class="btn " type="reset" >
												<i class="ace-icon fa fa-undo bigger-110"></i>
												重置
											</button>								
										</div>
										<div class="col-md-6">
											<button class="btn btn-info" type="submit" style="float:right">
												<i class="ace-icon fa fa-check bigger-110"></i>
												发布
											</button>								

										</div>
									</div>
								</div>

							</div>
						</div>


						<hr>
		
			
					</form>	
						<div id="dialog-confirm" class="hide">
							<form id="thumbupload"  action="__CONTROLLER__/thumb" enctype="multipart/form-data" method="post" >
								<input type="file" name="photo" class="btn btn-success btn-sm" value="浏览" />
								<input type="submit" class="btn btn-info btn-sm" value="上传">	
							</form>																			
						</div>
					</div>			
	
				</div>
			</div><!-- /.page-content -->
	 </div>
	<div class="footer">
		<div class="footer-inner">
			<div class="footer-content">
				<span class="bigger-120">
					Powered By <span class="blue bolder"><a href="http://www.mubansky.com" target="_blank" >SkyCMS</a></span>
					&copy; 2012-2014
				</span>

				&nbsp; &nbsp;
				<span class="action-buttons">
					<a href="#">
						<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-rss-square orange bigger-150"></i>
					</a>
				</span>
			</div>
		</div>
	</div>

	<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
		<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
	</a>

</div>




<script type="text/javascript">
jQuery(document).ready(function($) {

				$( "#id-btn-dialog1" ).on('click', function(e) {
				//	e.preventDefault();
			
					var dialog = $( "#dialog-message" ).removeClass('hide').dialog({
						modal: true,
						title: "<div class='widget-header widget-header-small'><h4 class='smaller'><i class='ace-icon fa fa-check'></i> jQuery UI Dialog</h4></div>",
						title_html: true,
						buttons: [ 
							{
								text: "Cancel",
								"class" : "btn btn-xs",
								click: function() {
									$( this ).dialog( "close" ); 
								} 
							},
							{
								text: "OK",
								"class" : "btn btn-primary btn-xs",
								click: function() {
									$( this ).dialog( "close" ); 
								} 
							}
						]
					});
			
					/**
					dialog.data( "uiDialog" )._title = function(title) {
						title.html( this.options.title );
					};
					**/
				});
			
			
				$( "#id-btn-dialog2" ).on('click', function(e) {
					e.preventDefault();
				
					$( "#dialog-confirm" ).removeClass('hide').dialog({
						resizable: false,
						modal: true,
						title: "<div class='widget-header'><h4 class='smaller'><i class='ace-icon fa fa-exclamation-triangle red'></i> Empty the recycle bin?</h4></div>",
						title_html: true,
						buttons: [
							{
								html: "<i class='ace-icon fa fa-trash-o bigger-110'></i>&nbsp; Delete all items",
								"class" : "btn btn-danger btn-xs",
								click: function() {
									$( this ).dialog( "close" );
								}
							}
							,
							{
								html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; Cancel",
								"class" : "btn btn-xs",
								click: function() {
									$( this ).dialog( "close" );
								}
							}
						]
					});
				});


	
});
				
			
</script>
 <include file="footer" />
